// Copyright 2021-2025 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-es v2.10.1 with parameter "bootstrap_wkt=true,target=ts,import_extension=js,json_types=true"
// @generated from file google/protobuf/cpp_features.proto (package pb, syntax proto2)
/* eslint-disable */

import type { GenEnum, GenExtension, GenFile, GenMessage } from "../../../../codegenv2/types.js";
import { fileDesc } from "../../../../codegenv2/file.js";
import type { FeatureSet } from "./descriptor_pb.js";
import { file_google_protobuf_descriptor } from "./descriptor_pb.js";
import type { Message } from "../../../../types.js";
import { messageDesc } from "../../../../codegenv2/message.js";
import { enumDesc } from "../../../../codegenv2/enum.js";
import { extDesc } from "../../../../codegenv2/extension.js";

/**
 * Describes the file google/protobuf/cpp_features.proto.
 */
export const file_google_protobuf_cpp_features: GenFile = /*@__PURE__*/
  fileDesc("CiJnb29nbGUvcHJvdG9idWYvY3BwX2ZlYXR1cmVzLnByb3RvEgJwYiL8AwoLQ3BwRmVhdHVyZXMS+wEKEmxlZ2FjeV9jbG9zZWRfZW51bRgBIAEoCELeAYgBAZgBBJgBAaIBCRIEdHJ1ZRiEB6IBChIFZmFsc2UY5weyAbgBCOgHEOgHGq8BVGhlIGxlZ2FjeSBjbG9zZWQgZW51bSBiZWhhdmlvciBpbiBDKysgaXMgZGVwcmVjYXRlZCBhbmQgaXMgc2NoZWR1bGVkIHRvIGJlIHJlbW92ZWQgaW4gZWRpdGlvbiAyMDI1LiAgU2VlIGh0dHA6Ly9wcm90b2J1Zi5kZXYvcHJvZ3JhbW1pbmctZ3VpZGVzL2VudW0vI2NwcCBmb3IgbW9yZSBpbmZvcm1hdGlvbhJaCgtzdHJpbmdfdHlwZRgCIAEoDjIaLnBiLkNwcEZlYXR1cmVzLlN0cmluZ1R5cGVCKYgBAZgBBJgBAaIBCxIGU1RSSU5HGIQHogEJEgRWSUVXGOkHsgEDCOgHEkwKGmVudW1fbmFtZV91c2VzX3N0cmluZ192aWV3GAMgASgIQiiIAQGYAQaYAQGiAQoSBWZhbHNlGIQHogEJEgR0cnVlGOkHsgEDCOkHIkUKClN0cmluZ1R5cGUSFwoTU1RSSU5HX1RZUEVfVU5LTk9XThAAEggKBFZJRVcQARIICgRDT1JEEAISCgoGU1RSSU5HEAM6PwoDY3BwEhsuZ29vZ2xlLnByb3RvYnVmLkZlYXR1cmVTZXQY6AcgASgLMg8ucGIuQ3BwRmVhdHVyZXNSA2NwcA", [file_google_protobuf_descriptor]);

/**
 * @generated from message pb.CppFeatures
 */
export type CppFeatures = Message<"pb.CppFeatures"> & {
  /**
   * Whether or not to treat an enum field as closed.  This option is only
   * applicable to enum fields, and will be removed in the future.  It is
   * consistent with the legacy behavior of using proto3 enum types for proto2
   * fields.
   *
   * @generated from field: optional bool legacy_closed_enum = 1;
   */
  legacyClosedEnum: boolean;

  /**
   * @generated from field: optional pb.CppFeatures.StringType string_type = 2;
   */
  stringType: CppFeatures_StringType;

  /**
   * @generated from field: optional bool enum_name_uses_string_view = 3;
   */
  enumNameUsesStringView: boolean;
};

/**
 * @generated from message pb.CppFeatures
 */
export type CppFeaturesJson = {
  /**
   * Whether or not to treat an enum field as closed.  This option is only
   * applicable to enum fields, and will be removed in the future.  It is
   * consistent with the legacy behavior of using proto3 enum types for proto2
   * fields.
   *
   * @generated from field: optional bool legacy_closed_enum = 1;
   */
  legacyClosedEnum?: boolean;

  /**
   * @generated from field: optional pb.CppFeatures.StringType string_type = 2;
   */
  stringType?: CppFeatures_StringTypeJson;

  /**
   * @generated from field: optional bool enum_name_uses_string_view = 3;
   */
  enumNameUsesStringView?: boolean;
};

/**
 * Describes the message pb.CppFeatures.
 * Use `create(CppFeaturesSchema)` to create a new message.
 */
export const CppFeaturesSchema: GenMessage<CppFeatures, {jsonType: CppFeaturesJson}> = /*@__PURE__*/
  messageDesc(file_google_protobuf_cpp_features, 0);

/**
 * @generated from enum pb.CppFeatures.StringType
 */
export enum CppFeatures_StringType {
  /**
   * @generated from enum value: STRING_TYPE_UNKNOWN = 0;
   */
  STRING_TYPE_UNKNOWN = 0,

  /**
   * @generated from enum value: VIEW = 1;
   */
  VIEW = 1,

  /**
   * @generated from enum value: CORD = 2;
   */
  CORD = 2,

  /**
   * @generated from enum value: STRING = 3;
   */
  STRING = 3,
}

/**
 * @generated from enum pb.CppFeatures.StringType
 */
export type CppFeatures_StringTypeJson = "STRING_TYPE_UNKNOWN" | "VIEW" | "CORD" | "STRING";

/**
 * Describes the enum pb.CppFeatures.StringType.
 */
export const CppFeatures_StringTypeSchema: GenEnum<CppFeatures_StringType, CppFeatures_StringTypeJson> = /*@__PURE__*/
  enumDesc(file_google_protobuf_cpp_features, 0, 0);

/**
 * @generated from extension: optional pb.CppFeatures cpp = 1000;
 */
export const cpp: GenExtension<FeatureSet, CppFeatures> = /*@__PURE__*/
  extDesc(file_google_protobuf_cpp_features, 0);

